<template>
  <div class="resource-basic">
    <div class="submit">
      <el-button type="primary" @click="handleSubmit">保存</el-button>
      <el-button type="primary" @click="handleBack">返回列表</el-button>
    </div>
    <el-form :model="form" label-width="207px">
      <el-form-item label="标题">
        <el-input v-model="form.name"/>
      </el-form-item>
      <el-form-item label="标签">
        <el-input v-model="form.name"/>
        <p>标签来自网校课程标签，由网校管理员统一管理。</p>
      </el-form-item>
      <el-form-item label="简介">
        <el-input
          :rows="4"
          v-model="form.name"
          type="textarea"
          style="margin-left:40px;width:500px;"
        />
      </el-form-item>
      <el-form-item label="分享">
        <div class="radio">
          <el-radio v-model="form.share" label="1">共享到公共资料（其他老师可以查看、预览、引用该资料）</el-radio>
        </div>
        <div class="radio">
          <el-radio v-model="form.share" label="2">仅自己可见</el-radio>
        </div>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data() {
    return {
      form: {
        title: 'title',
        label: 'label',
        detail: 'detail',
        share: '1'
      }
    }
  },
  methods: {
    handleSubmit() {
      console.log(this.form)
    },
    handleBack() {
      this.$router.go(-1)
    }
  }
}
</script>

<style lang="scss">
.resource-basic {
  .submit {
    width: 100%;
    line-height: 60px;
    height: 60px !important;
    text-align: right;
    padding-right: 30px;
    background-color: #ebf4ff;
  }
  .el-form {
    margin-top: 30px;
    p {
      margin: 0;
      color: #737373;
      margin-left: 40px;
    }
    input {
      width: 500px;
      margin-left: 40px;
    }
    .radio {
      margin-left: 40px;
    }
  }
}
</style>
